package serveur;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.List;
import java.util.Map;

import surname.protocol.AbstractRequest;
import surname.protocol.ListSurnameRequest;

public class Emission 
{
	private Socket socket;
	private ObjectOutputStream os;
	
	public Emission(Socket s)
	{
		socket = s;
		try 
		{
			os = new ObjectOutputStream(socket.getOutputStream());
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
	}
	
	public void send(ListSurnameRequest li)
	{
		try 
		{
			os.writeObject(li);
		} 
		catch (IOException e) 
		{
			System.out.println("Impossible de contacter le serveur");
			e.printStackTrace();
		}
	}

}
